#include "Run.h"


Run::Run()
{
	add = new Add;
	ui = new UI;
	this->run();
}


Run::~Run()
{
	delete add;
}

void Run::run()
{
	while (true)
	{
		system("CLS");
		ui->ui();
		cin >> n;
		switch (n)
		{
		case 1: system("CLS"); add->add(); break;
		case 2: system("CLS"); sub->sub(); break;
		case 3: system("CLS"); mul->mul(); break;
		case 4: system("CLS"); div->div(); break;
		default:
			break;
		}
		if (n == 5)
			break;
	}
}
